package model;

public class Item {
	private Product product;
	private int quantity;
	private float itemprice;
	
	public Item(Product product,int quantity){
		this.product = product;
		this.quantity = quantity;
		this.setItemprice(this.quantity);
	}
	
	public float getItemprice() {
		return itemprice;
	}

	public void setItemprice(int quantity) {
		itemprice = product.getPrice() * quantity;
	}

	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public int getQuantity() {
		return quantity;
	}
	public void setQuantity(int quantity) {
		this.quantity = quantity;
		this.setItemprice(this.quantity);
	}
}